function(string_remove var)
  foreach(arg ${ARGN})
    string(REPLACE "${arg} " "" ${var} "${${var}}")
    string(REPLACE "${arg}" "" ${var} "${${var}}")
  endforeach()
  set(${var} "${${var}}" PARENT_SCOPE)
endfunction()

function(string_prefix var)
  foreach(arg ${ARGN})
    string(FIND "${${var}}" "${arg}" found)
    if(${found} EQUAL -1)
      string(STRIP "${arg} ${${var}}" ${var})
    endif()
  endforeach()
  set(${var} "${${var}}" PARENT_SCOPE)
endfunction()

function(string_append var)
  foreach(arg ${ARGN})
    string(FIND "${${var}}" "${arg}" found)
    if(${found} EQUAL -1)
      string(STRIP "${${var}} ${arg}" ${var})
    endif()
  endforeach()
  set(${var} "${${var}}" PARENT_SCOPE)
endfunction()
